#include <bits/stdc++.h>

using namespace std;
//stack FILO (First In Last  Out)
int data[1000], top = -1;//stack EOF 错误
//1 2 3 4 5 依次进栈
//重复输出栈顶元素 直到栈为空
//栈的常见操作

//1. 初始化空栈init  top=-1
//2. 进栈 push data[++top]=x;
//3. 出栈 pop  top--;
//4. 查询栈顶（不弹出) data[top]


int main() {
    top = -1;
    data[++top] = 1;
    data[++top] = 2;
    data[++top] = 3;
    data[++top] = 4;
    data[++top] = 5;

    while (top != -1) {
        cout << data[top];
        --top;
    }

    return 0;
}